{!extends base.html !}
{!block title!}{%set page 'index'%}Jangod, a java template engine{!endblock!}
{!block content!}
<h1>What is Jangod ?</h1>
<p>Jangod is a template engine, a Java-based template language inspired by 
<a href="http://docs.djangoproject.com/en/dev/topics/templates/" target="blank">Django</a> template syntax. 
So we just simply pulled the character 'D' to end, named "Jangod", to highlight Java characteristic. 
It's used to generate any text output according to the templates and their reference objects, although 
at first used for web development especially in MVC (Model View Controller) pattern to generate html page.
Benefit from the separation of data and presentation, how to obtain the data is arbitrary, can use cache
or lazy-load whatever, let programmers work on what they are good at.
</p>
<p>The most powerful feature of Jangod is template inheritance with sub-blocks, 
only override some blocks to achieve the purpose of reuse tehmplate. 
Syntax is very simple, ensure that everyone can get started quickly.
Jangod is highly customizable, developers can import their tags, filters or macros 
to enhance the template function. Also, it's an efficient engine while rendering,
it can cache templates' parse or even pre-compiled to Java classes to spleed up processing.
</p>
<h2>Template file likes</h2>
<pre class="code">
<span class="light">{\% extends "base.html" %}</span>
<span class="light">{\% block content %}</span>
    &lt;div id="part-content"&gt;
    <span class="light">{\% if posts %}</span>
        <span class="light">{\% for post in posts %}</span>
            &lt;div id="post-<span class="light">{\{post.id}}</span>" class="post-home"&gt;
                &lt;div class="post-title"&gt;
                    &lt;h1&gt;&lt;a href="<span class="light">{\{post.link}}</span>" rel="bookmark"&gt;
                        <span class="light">{\{post.title}}</span>
                    &lt;/a&gt;&lt;/h1&gt;
                &lt;/div&gt;
                &lt;div class="post-content"&gt;<span class="light">{\{post.preview}}</span>&lt;/div&gt;
                &lt;div class="post-time"&gt;<span class="light">{\{post.date|date:"HH:mm yyyy-MM-dd"}}</span>&lt;/div&gt;
            &lt;/div&gt;        
        <span class="light">{\% endfor %}</span>
        &lt;div class="navigation"&gt;
        <span class="light">{\% if pager.prev %}</span>
            &lt;div class="alignleft"&gt;
                &lt;a href="<span class="light">{\{site.url}}</span>post/<span class="light">{\{pager.prev}}</span>.html"&gt;&laquo; Prev&lt;/a&gt;
            &lt;/div&gt;
        <span class="light">{\% endif %}</span>
        <span class="light">{\% if pager.next %}</span>
            &lt;div class="alignright"&gt;
                &lt;a href="<span class="light">{\{site.url}}</span>post/<span class="light">{\{pager.next}}</span>.html"&gt;Next &raquo;&lt;/a&gt;
            &lt;/div&gt;
        <span class="light">{\% endif %}</span>
        &lt;/div&gt;
    <span class="light">{\% else %}</span>
        &lt;h2&gt;Not Found&lt;/h2&gt;
        &lt;p&gt;Sorry, but you are looking for something that isn't here.&lt;/p&gt;
    <span class="light">{\% endif %}</span>
    &lt;/div&gt;
<span class="light">{\% include "sidebar1.html" %}</span>
<span class="light">{\% include "sidebar2.html" %}</span>
<span class="light">{\% endblock %}</span>
</pre>
<p>Jangod is free, under <a href="license.html">Apache License 2.0</a>, and is open-source too. Enjoy it.
</p>
{!endblock!}